#include <iostream>
#include "person.h"
#include <kylin-ai-document-service/include/client.h>

int main()
{
    class person p1(20, "John");
    std::cout << "age: " << p1.get_age() << ", name: " << p1.get_name() << std::endl;

    try
    {
        auto client = std::make_unique<document::DocumentChunkClient>();
        if (!client)
        {
            return 1;
        }
        std::vector<std::string> file_paths = {
            "/home/kylin/文档/操作系统大会演示素材v0.2/智能数据管理素材/文档素材/公司报销制度及流程.docx"
        };
        std::vector<std::string> chunker_types = {"TextChunker"};
        std::vector<int32_t> chunk_sizes = {500};
        void *callback_data = nullptr;

        // 同步请求
        auto sync_response = client->SyncChunkDocument(file_paths, chunker_types, chunk_sizes);
        std::cout << "SyncChunkDocument Response: " << std::endl;
        std::cout << "data: " << sync_response.data << std::endl;
        std::cout << "errorCode: " << sync_response.errorCode << std::endl;
        std::cout << "errorMsg: " << sync_response.errorMsg << std::endl;
    }
    catch (const std::exception &ex)
    {
        return 0;
    }

    return 0;
}